package com.example.carapplication.pageFragment;

import com.example.carapplication.R;
import com.example.carapplication.setMyMessage.MyMessageActivity;
import android.support.v4.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
//我的
import android.widget.LinearLayout;
import android.widget.TextView;

public class MyFragment extends Fragment implements OnClickListener {
	LinearLayout linearLayout;
	ImageView imageView;
	TextView textView;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View v = inflater.inflate(R.layout.tab04, null);
		return v;
	}

	@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onViewCreated(view, savedInstanceState);
		initView(view);
		initEvents();
	}

	private void initView(View view) {
		linearLayout = (LinearLayout) view.findViewById(R.id.linearLayou1);
		imageView = (ImageView) view.findViewById(R.id.headImage);
		textView = (TextView) view.findViewById(R.id.id_user_head);
	}

	private void initEvents() {
		linearLayout.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent i = new Intent();
		i.setClass(getActivity(), MyMessageActivity.class);
		startActivity(i);

	}
}
